import logging

def main():
	logging.basicConfig(filename='app.log',level=logging.ERROR,format='%(levelname)s: %(asctime)s: %(message)s')
	hostname = 'www.python.org'
	item = 'spam'
	filename = 'data.csv'
	mode = 'r'
	
	logging.critical('Host %s unkown',hostname)
	logging.error('could not find %r',item)
	logging.warning('Feature is deprecated')
	
	
main()